Language-integrated query (LINQ), and supporting technology, provide a convenient and declarative shorthand query syntax (e.g., SQL-like) to facilitate specification of queries within a programming language (e.g., C#®, Visual Basic® . . . ). More specifically, query operators are provided that map to lower-level language constructs or primitives such as methods and lambda expressions. Query operators are provided for various families of operations (e.g., filtering, projection, joining, grouping, ordering . . . ), and can include but are not limited to “where” and “select” operators that map to methods that implement the operators that these names represent.
Typically, LINQ queries are specified and executed with respect to arbitrary collections of data such as, a relational store and/or a non-relational store. In a relational store or database, data is structured in terms of one or more tables. Tables are relations that comprise a number of columns and rows, wherein columns, referred to as attributes or dimensions, and rows, referred to as records, capture data for specific entity instances. In non-relational databases or key-value stores, non-relational databases or stores represent a simple data model that maps unique keys to a set of one or more values. More specifically, the non-relational database stores values and an index to facilitate location of the stored values based on a key.
In terms of relational data sources, a common implementation often includes Business Information (BI) analysis. For instance, an online analytical processing (OLAP) data source is a kind of relational data source that can receive and execute a query. OLAP data sources are beneficial in Business Information (BI) analysis based upon multidimensional capabilities and characteristics. Relational databases and, in particular, OLAP data sources typically include grouping operators such as “Rollup,” and “Cube,” among others, to summarize tables. Both “Rollup” and “Cube” are extensions of a “GroupBy” operator that allows data across records to be grouped by data in one or more columns, and is often utilized in conjunction with an aggregation function such as “Sum,” “Count,” “Min,” or “Max.” The “Rollup” operator computes multiple levels of any potential aggregate across specified columns or dimensions and also calculates a grand total. Such totals can be inserted as summarization rows. The “Cube” operator computes subtotals for all combinations of a set of provided grouping columns and thus generates all values produced by a “Rollup” operation plus values associated with additional combinations.